<html xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:t="http://myfaces.apache.org/tomahawk">
 
<f:view>
<f:loadBundle var="text" basename="#{mBeanList.bundleName}"/>
    <head>
        <title>#{text['mbeanList.title']}</title>
        <meta name="heading" content="#{text['mbeanList.heading']}"/>
        <meta name="menu" content="MBeanMenu"/>
    </head>
<body id="mbeanList">
<h:form id="editMBean">
 
<h:commandButton value="#{text['button.add']}" action="add" id="add" immediate="true" styleClass="button"/>
<h:commandButton value="#{text['button.done']}" action="mainMenu" id="cancel" immediate="true" styleClass="button" style="margin-left: 5px"/>
 
<!-- Error from this table is caused by http://issues.apache.org/jira/browse/TOMAHAWK-466 -->
<t:dataTable id="mbeans" var="mbean" style="margin-top: 10px"
    value="#{mBeanList.mbeans}" rows="25" sortColumn="#{mBeanList.sortColumn}"
    sortAscending="#{mBeanList.ascending}" styleClass="scrollerTable table"
    headerClass="standardTable_Header" rowClasses="standardTable_Row1,standardTable_Row2"
    columnClasses="standardTable_Column,standardTable_Column,standardTable_Column,standardTable_Column,standardTable_ColumnCentered">
 
    <t:column>
        <f:facet name="header">
            <t:commandSortHeader columnName="id" arrow="true">
                <h:outputText value="#{text['mbean.id']}" />
            </t:commandSortHeader>
        </f:facet>
        <h:commandLink action="#{mBeanForm.edit}" value="#{mbean.id}">
            <f:param name="id" value="#{mbean.id}"/>
            <f:param name="from" value="list"/>
        </h:commandLink>
    </t:column>
 
    <t:column>
        <f:facet name="header">
            <t:commandSortHeader columnName="firstName" arrow="true">
                <h:outputText value="#{text['mbean.name']}" />
            </t:commandSortHeader>
        </f:facet>
        <h:outputText value="#{mbean.name}" escape="true"/>
    </t:column>
 
    <t:column>
        <f:facet name="header">
            <t:commandSortHeader columnName="lastName" arrow="true">
                <h:outputText value="#{text['mbean.type']}" />
            </t:commandSortHeader>
        </f:facet>
        <h:outputText value="#{mbean.type}" escape="true"/>
    </t:column>
 
</t:dataTable>
 
<ui:include src="/common/tableFooter.xhtml">
    <ui:param name="tableName" value="mbeans"/>
</ui:include>
 
<script type="text/javascript">
    highlightTableRows("editMBean:mbeans");
</script>
 
</h:form>
</body>
</f:view>
</html>